<#import "PojoMacro.ftl" as pojo>
package ${class.package.name?substring(0, class.package.name?last_index_of("."))}.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;
import ${class.package.name?substring(0, class.package.name?last_index_of("."))}.vo.${class.name}ListVo;
<#assign hasDate=false><#t/>
<#list plugin.getClassProperties(class) as property><#t/>
	<#if property.name != "status" && property.name != "createdDate" && property.name != "createdUser" && property.name != "updatedDate" && property.name != "updatedUser"><#t/>
		<#if property.entity.propertyType = "java.util.Date" ><#t/>
			<#assign hasDate=true>
		</#if><#t/>
	</#if><#t/>
</#list><#t/>
<#if hasDate ><#t/>
import java.util.Date;
</#if><#t/>

public class ${class.name}ListMapper implements RowMapper {

	public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
		${class.name}ListVo vo = new ${class.name}ListVo();
<#list plugin.getClassId(class) as property><#t/>
		vo.setId(new Long(rs.getLong("${property.entity.getTagByName('hibernate.id').column?upper_case}")));
</#list><#t/>
<#list plugin.getClassProperties(class) as property><#t/>
	<#if property.name != "status" && property.name != "createdDate" && property.name != "createdUser" && property.name != "updatedDate" && property.name != "updatedUser"><#t/>
		<#if (property.entity.getTagByName("hibernate.custom")??) && property.entity.getTagByName("hibernate.custom").show!false ><#t/>
		<#else>
		<#assign propertyTag=property.entity.getTagByName("hibernate.property")><#t/>
			<@pojo.mapper type=property.entity.propertyType name=property.name column=plugin.buildComponentColumnName(propertyTag.column) />
		</#if><#t/>
	</#if><#t/>
</#list><#t/>
		return vo;
	}

}
